﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddCallUC.ascx.cs" Inherits="UC_AddCallUC" %>

<%@ Register src="~/UC/CallSatusUC.ascx" tagname="CallSatusUC" tagprefix="uc" %>
<%@ Register src="~/UC/DatePickerUC.ascx" tagname="DatePickerUC" tagprefix="uc" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>



<asp:Panel ID="pnlSaveCall" runat="server">
  <table style=" width:1100px;" border="0">
    <tr>
      <td colspan="4">
        <table style=" width:100%">
          <tr>      
            <td><h1>Call Log Form</h1></td>          
            <td style="text-align:right;"><h1><asp:Label id="lblNotification" runat="server" style="width:100%; font-weight:bold; text-align:right;"></asp:Label></h1></td>
          </tr>
        </table>              
        <p>Fill This form to register a call for AC installation. Feilds Marked with red star
        <label class="error">*</label> are required fields hence suitable value is required for those fields.</p>
      </td>
    </tr>
    <tr>      
      <td><asp:label id="lblCallDateCapsion"  text="Call Date" runat="server"></asp:label></td>          
      <td><asp:label id="lblCallType"  text="Call Type" runat="server"></asp:label></td>
      <td><asp:label id="lblDealer"  text="Dealer" runat="server"></asp:label></td>
      <td><asp:Label ID="lblStatus" runat="server" text="Status"></asp:Label></td>
    </tr>
    <tr>
      <td>
        <asp:HiddenField ID="hdnCallID" runat="server" />
      <asp:Label ID="lblCallDateValue" runat="server" ForeColor="#669600" Font-Size="Large" Text="date" >
      
      </asp:Label></td>         
      <td>
        <asp:DropDownList ID="ddlCallType" runat="server" OnSelectedIndexChanged="ddlCallType_SelectedIndexChanged"></asp:DropDownList><label class="error">*</label>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlCallType" 
        EnableClientScript="true" Display="Static" InitialValue="0" SetFocusOnError="true" 
          CssClass="error" Text="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
      </td>
      <td>
        <asp:DropDownList ID="ddlDealer" runat="server"  AutoPostBack="false" style="width:auto;"></asp:DropDownList><label class="error">*</label>
        <asp:RequiredFieldValidator ID="reqDdlDealer" runat="server" ControlToValidate="ddlDealer" 
        EnableClientScript="true" Display="Static" InitialValue="0" SetFocusOnError="true" 
          CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
      </td>
      <td><uc:CallSatusUC ID="UCCallSatus" runat="server" ValidationGroup="submit"/></td>
    </tr>
    <tr>
      <td>
        <asp:HiddenField ID="hdnCustomerID" runat="server" />
        <asp:Label ID="lblCustomerName" Text="Customer Name" runat="server"></asp:Label>
      </td>
      <td>
        <asp:TextBox ID="txtCustomerName" runat="server"></asp:TextBox>
        <label class="error">*</label>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtCustomerName" 
        EnableClientScript="true" Display="Static"  SetFocusOnError="true" 
          CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
      </td>
      <td><asp:Label ID="lblAddress" Text="Address" runat="server"></asp:Label></td>
      <td>
        <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" style="height:50px; width:200px;" ></asp:TextBox>
        <label class="error">*</label>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtAddress" 
        EnableClientScript="true" Display="Static"  SetFocusOnError="true" 
          CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
      </td>          
    </tr>
    <tr>
        <td><asp:Label ID="lblMobNo1" Text="Moblle No. 1" runat="server"></asp:Label></td>
        <td>
        <asp:TextBox ID="txtMobNo1" runat="server"  MaxLength="11"></asp:TextBox><label class="error">*</label>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtMobNo1" 
            EnableClientScript="true" Display="Static"  SetFocusOnError="true"
            CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
        <asp:CompareValidator ID="cmpMobNo1" runat="server" ControlToValidate="txtMobNo1" Display="Static" ErrorMessage="Neumeric Value Only"
            Type="Double" ValidationGroup="submit" CssClass="error" Operator="DataTypeCheck"></asp:CompareValidator>
        </td> 
      <td>
        <asp:Label ID="lblZipCode" Text="ZIP Code" runat="server"></asp:Label>
      </td> 
      <td>
        <asp:TextBox ID="txtZipCode" runat="server"></asp:TextBox><label class="error">*</label>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtZipCode" 
        EnableClientScript="true" Display="Static"  SetFocusOnError="true" 
          CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
        <asp:CompareValidator ID="cmpZopCode" runat="server" ControlToValidate="txtZipCode" Display="Static" ErrorMessage="Neumeric Value Only"
          Type="Double" ValidationGroup="submit" CssClass="error" Operator="DataTypeCheck"></asp:CompareValidator>
      </td>                    
    </tr>
    <tr>
      
      <td><asp:Label ID="lblPhoneNo" Text="Phone No." runat="server"></asp:Label></td>
      <td>
        <asp:TextBox ID="txtPhoneNo" runat="server" MaxLength="11"></asp:TextBox>
        <asp:CompareValidator ID="cmpPhone" runat="server" ControlToValidate="txtPhoneNo" Display="Static" ErrorMessage="Neumeric Value Only"
          EnableClientScript="true" Type="Double" ValidationGroup="submit" CssClass="error" Operator="DataTypeCheck"></asp:CompareValidator>          
      </td>
      <td><asp:Label ID="lblMobNo2" Text="Mobile No. 2" runat="server" ></asp:Label></td>
      <td>
        <asp:TextBox ID="txtMobNo2" runat="server"></asp:TextBox>
          <asp:CompareValidator ID="cmpMobNo2" runat="server" ControlToValidate="txtMobNo2" Display="Static" ErrorMessage="Neumeric Value Only"
          Type="Integer" ValidationGroup="submit" CssClass="error" Operator="DataTypeCheck"></asp:CompareValidator>
      </td>
    </tr>        
    <tr>
      <td><asp:Label ID="lblACBrand" Text="Ac Brand" runat="server"></asp:Label></td>
      <td>
        <asp:DropDownList ID="ddlACBrands" runat="server"  AutoPostBack="false" style="width:auto;"></asp:DropDownList><label class="error">*</label>
        <asp:RequiredFieldValidator ID="reqACBrands" runat="server" ControlToValidate="ddlACBrands" 
        EnableClientScript="true" Display="Static" InitialValue="0" SetFocusOnError="true" 
          CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>         
      </td> 
      <td><asp:Label ID="lblACModelNo" Text="Model No." runat="server"></asp:Label></td>
      <td>
        <asp:TextBox ID="txtACModelNo" runat="server"></asp:TextBox><label class="error">*</label>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtACModelNo" 
        EnableClientScript="true" Display="Static"  SetFocusOnError="true" 
          CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
      </td> 
    </tr>
    <tr>
      <td><asp:Label ID="lblACPurchasedDate" Text="Purchased Date" runat="server"></asp:Label></td>
      <td>
          <uc:DatePickerUC ID="UCdpACPurchaseDate" WatermarkText="PurchaseDate" runat="server" />       
      </td> 
      <td><asp:Label ID="lblACSerialNo" Text="Serial No." runat="server"></asp:Label></td>
      <td>
        <asp:TextBox ID="txtACSerialNo" runat="server"></asp:TextBox><label class="error">*</label>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtACSerialNo" 
        EnableClientScript="true" Display="Static"  SetFocusOnError="true" 
          CssClass="error" Text="Req" ErrorMessage="Req" ValidationGroup="submit" ></asp:RequiredFieldValidator>
      </td> 
    </tr>        
    <tr>
      <td colspan="6">        
        <asp:Label ID="lblPreviousComment" runat="server" Visible="false"></asp:Label>        
        <asp:TextBox ID="txtComment" TextMode="MultiLine" Width="870px" Height="70px" runat="server"></asp:TextBox>
      </td>
    </tr>
    <tr>
      <td colspan="6" style="text-align:center;">
      <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="submit" OnClick="btnSave_Click" CommandName="Save" />
      <asp:Button ID="btnCancel" runat="server" Text="Cancel"  />
      </td>
    </tr>
  </table> 
</asp:Panel>

